<?php
function mediaMakePicThumb($file) {
  global $showfolder;
  global $media_dir;
  global $media_fol;
  
  $a = getimagesize($media_dir.$showfolder.$file);
  $w = $a[0]; // Breite
  $h = $a[1]; // Hoehe
  
  if($w>$h) {  
    return "<img src=\"".$media_fol.$showfolder.$file."\" style=\"width: 48px;\" alt=\"Bild: ".$file."\" />";
  } else {
    return "<img src=\"".$media_fol.$showfolder.$file."\" style=\"height: 48px;\" alt=\"Bild: ".$file."\" />";
  }
}

function mediaMakePicBig($file) {
  global $showfolder;
  global $media_fol;
  return "<img src=\"".$media_fol.$showfolder.$file."\" alt=\"Bild: ".$file."\" />";
}

mediaRegisterFunc(array("jpe", "jpg", "jpeg", "gif", "png"), "mediaMakePicThumb", "thumb");
mediaRegisterFunc(array("jpe", "jpg", "jpeg", "gif", "png"), "mediaMakePicBig", "big");
mediaRegisterDocu(array("jpe", "jpg", "jpeg", "gif", "png"), "Bilder", "Zeigt alle g&auml;ngigen Bildformate an");
?>